package com.ChenYaRou.www.controller.servlet;

import com.ChenYaRou.www.controller.GetAllShopFoodServletController;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @ClassName GetAllShopFood
 * @Description TODO
 * @Author 86183
 * @Date 2022/4/30 17:46
 * @Version 1.0
 **/
public class GetAllShopFoodServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        GetAllShopFoodServletController getAllShopFood=new GetAllShopFoodServletController();
        String json = getAllShopFood.getAllShopFood();

        PrintWriter out = resp.getWriter();
        out.write(json);
        out.flush();
        out.close();
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
}
